//
//  NotesDetailTableViewCell.m
//  TakeHer
//
//  Created by 胖疙瘩的小疙瘩 on 15/6/18.
//  Copyright (c) 2015年 蓝鸥科技. All rights reserved.
//

#import "NotesDetailTableViewCell.h"

@implementation NotesDetailTableViewCell


- (void)dealloc
{
    [_notesDetailTitle release];
    [_topImage release];
    [_notesDetailImages release];
    [_notesDetail release];
    [_data release];
    [_days release];
    
    [super dealloc];
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {

// 顶部图标题和图片
//        self.notesDetailTitle = [[UILabel alloc]init];
//        self.notesDetailTitle.backgroundColor = [UIColor lightGrayColor];
//        [self.topImage addSubview:self.notesDetailTitle];
//        [_notesDetailTitle release];
//
        
        //游记文字详情
        self.notesDetail = [[UILabel alloc] init];
        //self.notesDetail.backgroundColor = [UIColor blackColor];
        self.notesDetail.numberOfLines = 0;
        [self.notesDetail sizeToFit];
        [self.contentView addSubview:self.notesDetail];
        [_notesDetail release];
        
        //游记详情第几天
        self.numberDay = [[UILabel alloc] init];
        [self.contentView addSubview:self.numberDay];
        [_numberDay release];
        
        
        
        //游记图详情
        self.notesDetailImages = [[UIImageView alloc] init];
        //self.notesDetailImages.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:self.notesDetailImages];
        [_notesDetailImages release];
        
        
        //日期
        self.data = [[UILabel alloc] init];
        self.data.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:self.data];
        [_data release];
        
        //共几天
        self.days = [[UILabel alloc] init];
        self.days.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:self.days];
        [_days release];
        
        //游记详情 的图片和介绍
//        self.notesDetailImages = [[[[self.notesImageArr objectAtIndex:indexPath.section] objectForKey:@"waypoints"] objectAtIndex:indexPath.row] objectForKey:@"photo_1600"];
//        thirdDetailVC.notesLabel = [[[[self.notesImageArr objectAtIndex:indexPath.section] objectForKey:@"waypoints"] objectAtIndex:indexPath.row] objectForKey:@"text"];
        
    }
    return self;
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    
    self.notesDetailImages.frame = CGRectMake(20, 20, self.contentView.bounds.size.width - 40, (self.contentView.bounds.size.width - 40) / 5 * 4);
    self.notesDetail.frame = CGRectMake(20, (self.contentView.bounds.size.width - 40) / 5 * 4 + 20, self.contentView.bounds.size.width - 40, self.contentView.bounds.size.height - (self.contentView.bounds.size.width - 40) / 5 * 4 - 20 - 20);
   
    
}



/*
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
*/
@end
